<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>山西煤炭现货公路交易系统客户端</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/bootstrap/css/bootstrap.min.css">
<!-- daterange picker -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/plugins/daterangepicker/daterangepicker-bs3.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/ionicons/css/ionicons.min.css">
<!-- jvectormap -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- Theme style -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/dist/css/skins/_all-skins.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/plugins/datatables/dataTables.bootstrap.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
     folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/dist/css/skins/_all-skins.min.css">
<!-- jQuery 2.1.4 -->
<script src="<s:url value="/resources"/>/adminlte/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="<s:url value="/resources"/>/adminlte/bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="<s:url value="/resources"/>/adminlte/dist/js/app.min.js"></script>
<!-- Select2 -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/plugins/select2/select2.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="<s:url value="/resources"/>/adminlte/dist/css/AdminLTE.min.css">
<!-- date-range-picker -->
<script src="<s:url value="/resources"/>/adminlte/moment.min.js"></script>
<script src="<s:url value="/resources"/>/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<!-- DataTables -->
<script src="<s:url value="/resources"/>/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<s:url value="/resources"/>/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- Select2 -->
<script src="<s:url value="/resources"/>/adminlte/plugins/select2/select2.full.min.js"></script>
<script src="<s:url value="/resources"/>/adminlte/plugins/select2/i18n/zh-CN.js"></script>
<!-- 引入 echarts.js -->
<script src="<s:url value="/resources"/>/echarts/echarts.min.js"></script>
<script src="<s:url value="/resources"/>/adminlte/default.js"></script>
<script src="<s:url value="/resources"/>/echarts/myechart/areaChart.js"></script>
<script src="<s:url value="/resources"/>/adminlte/default_logistical.js"></script>
<script src="<s:url value="/resources"/>/adminlte/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	 $(function(){  
	   // loadUserInfo();
	    
	    dataTab("dataTab",true,false,false,true,true,false,"<s:url value="/resources"/>/adminlte/dataTabBootstrapCN.json");     
	     
	    loadMenu("${user.roleType}","${menuid}",${menuList});
	    //areaChart();
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selStation","station","station");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selArrive","arriveStation","arriveStation");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selShipper","shipper","shipper");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selRec","receiver","receiver");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selDaoddq","daoddq","daoddq");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selDaoj","daoj","daoj");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selHangy1","hangy1","hangy1");
	    getSelOpts("<s:url value="/"/>/logistical/getSelOpts","selHangy2","hangy2","hangy2");
	    $(".select2").select2();
	 });
	 function clickSum(){
		 if(validateDay("2")){
			 document.getElementById("form").submit();
		 }
	 }
</script>
</head>
<body class="skin-blue sidebar-mini">
<div class="wrapper">
<%@ include file="../../header.jsp" %>
<%@ include file="../../sidebar.jsp" %>
<div class="content-wrapper" >
      <div class="content-header" >
        <h1> 物流分析<small>按发运明细查询</small></h1>
        <ol class="breadcrumb">
          <li><a href="<s:url value="/"/>/index.jsp"><i class="fa fa-dashboard"></i>首页</a></li>
          <li><a href="#" id="location1"></a></li>
          <li class="active" id="location2"></li>
        </ol>
      </div>
        <!-- Main content -->
        <div class="content">
         <!-- 查询条件 -->
         <form id="form" action="<s:url value="/"/>/logistical/shipmentDetail" method="post">
         <input type="hidden" value='${selStation}' name="selStation" id ="selStation"/>
         <input type="hidden" value='${selArrive}' name="selArrive" id ="selArrive"/>
         <input type="hidden" value='${selShipper}' name="selShipper" id ="selShipper"/>
         <input type="hidden" value='${selRec}' name="selRec" id ="selRec"/>
         <input type="hidden" value='${selDaoddq}' name="selDaoddq" id ="selDaoddq"/>
         <input type="hidden" value='${selDaoj}' name="selDaoj" id ="selDaoj"/>
         <input type="hidden" value='${selHangy1}' name="selHangy1" id ="selHangy1"/>
         <input type="hidden" value='${selHangy2}' name="selHangy2" id ="selHangy2"/>
          <div class="box box-default">
            <div class="box-header with-border">
              <h3 class="box-title">查询条件</h3>
              <div class="box-tools pull-right">
                <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
              </div>
            </div><!-- /.box-header -->
            <div class="box-body">
              <div class="row">
              	<div class="col-md-6">
                  <div class="form-group">
                    <label>选择发站</label>
                    <select id="station" name="station" class="form-control select2" multiple="multiple" data-placeholder="请选择发站" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择到站</label>
                    <select id="arriveStation" name="arriveStation" class="form-control select2" multiple="multiple" data-placeholder="请选择到站" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择托运人</label>
                    <select id="shipper" name="shipper" class="form-control select2" multiple="multiple" data-placeholder="请选择托运人" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择收货人</label>
                    <select id="receiver" name="receiver" class="form-control select2" multiple="multiple" data-placeholder="请选择收货人" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择到达地区</label>
                    <select id="daoddq" name="daoddq" class="form-control select2" multiple="multiple" data-placeholder="请选择到达地区" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择到局</label>
                    <select id="daoj" name="daoj" class="form-control select2" multiple="multiple" data-placeholder="请选择到局" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择行业</label>
                    <select id="hangy1" name="hangy1" class="form-control select2" multiple="multiple" data-placeholder="请选择行业" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                  <div class="form-group">
                    <label>选择行业细化</label>
                    <select id="hangy2" name="hangy2" class="form-control select2" multiple="multiple" data-placeholder="请选择行业细化" style="width: 100%;">
                  	</select>
                  </div><!-- /.form-group -->
                </div><!-- /.col -->
                <div class="col-md-6">
                 <!-- Date range -->
                 <div class="form-group">
                    <label>日期范围:</label>
                    <div class="input-group">
                    <div class="input-group-addon">
                        <i class="fa fa-calendar"></i>
                      </div>
                      <input type="text" style="width:30%;padding-left: 17px;height: 32px;border: 1px solid #d2d6de;"  class="" id="startDate" name="startDate" value="${startDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM'})">
                      &nbsp;&nbsp;--&nbsp;&nbsp;<input type="text" style="width:30%;;padding-left: 27px;height: 32px;border: 1px solid #d2d6de;" class="" id="endDate" name="endDate" value="${endDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM'})">
                    &nbsp;&nbsp;&nbsp;
                    </div><!-- /.input group -->
                    </div>
                  <div class="form-group">
                      <button class="btn btn-primary"  type="button" onclick="clickSum()">查询</button>
                  </div>
               </div>
              </div><!-- /.row -->
            </div><!-- /.box-body -->
          </div><!-- /.box -->
          </form>
        <div class="box">
                <div class="box-header">
                  <h3 class="box-title">数据表(注：吨数以万吨为单位)</h3>
                  <div class="box-tools pull-right">
                <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                <!-- <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button> -->
              </div>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="dataTab" class="table table-bordered table-hover">
	                  	<thead>
		                      <tr>
		                        <th>发站</th>
		                        <th>到站</th>
		                        <th>托运人</th>
		                        <th>收货人</th>
		                        <th>到达地区</th>
		                        <th>到局</th>
		                        <th>行业</th>
		                        <th>行业细化</th>
		                        <th>需求车数</th>
		                        <th>需求吨数</th>
		                        <th>受理车数</th>
		                        <th>受理吨数</th>
		                        <th>完成车数</th>
		                        <th>完成吨数</th>
		                        <th>预约号</th>
		                        <th>受理号</th>
		                        <th>年份</th>
		                        <th>月份</th>
		                      </tr>
                    	</thead>
	                    <tbody>
	                      <c:forEach items="${tablist}" var="li">
	                      	 <tr>
	                        	<td>${li.faz}</td>
	                        	<td>${li.daoz}</td>
	                        	<td>${li.tuoyr}</td>
	                        	<td>${li.shouhr}</td>
	                        	<td>${li.daoddq}</td>
	                        	<td>${li.daoj}</td>
	                        	<td>${li.hangy1}</td>
	                        	<td>${li.hangy2}</td>
	                        	<td>${li.xuqcs}</td>
	                        	<td>${li.xuqds}</td>
	                        	<td>${li.shoulcs}</td>
	                        	<td>${li.shoulds}</td>
	                        	<td>${li.wanccs}</td>
	                        	<td>${li.wancds}</td>
	                        	<td>${li.yuyh}</td>
	                        	<td>${li.shoulh}</td>
	                        	<td>${li.nianf}</td>
	                        	<td>${li.yuef}</td>
	                        </tr>
	                      </c:forEach>
	                    </tbody>
                  </table>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
        </div><!-- /.content -->
      </div><!-- /.content-wrapper -->
</div>  
</body>
</html>
